package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author wanfeng
 * @version 1.0
 * @since 2025-09-17 10:41
 */

@RestController("operationAgencyCertificationAuditController")
@RequestMapping("/operation/agency-certification-audit")
@Api(tags = "运营端 - 机构认证信息相关接口")
public class AgencyCertificationAuditController {

    @Resource
    private IAgencyCertificationService agencyCertificationService;

    /**
     * 机构分页查询
     * @param agencyCertificationAuditPageQueryReqDTO
     * @return
     */
    @GetMapping("/page")
    @ApiOperation("服务人员认证信息分页查询")
    public PageResult<AgencyCertificationAuditResDTO> page(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO){
        return agencyCertificationService.pageQuery(agencyCertificationAuditPageQueryReqDTO);

    }

    /**
     * 审核
     * @param certificationAuditReqDTO
     * @param id
     */
    @PutMapping("/audit/{id}")
    @ApiOperation("审核服务人员认证信息")
    public void audit(CertificationAuditReqDTO certificationAuditReqDTO,
                      @PathVariable("id") Long id){
        agencyCertificationService.auditById(certificationAuditReqDTO,id);
    }



}
